
.gallery-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 20px;
}

.gallery-container h2 {
    font-size: 48px;
    font-weight: 600;
    color: #2B2B2B;
    margin-bottom: 40px;
    text-align: left;
}
/* Main grid with 2 rows */
.gallery {
    display: grid;
    grid-template-rows: 320px 320px;
    gap: 50px;
}

/* First row grid */
.gallery-row-1 {
    display: grid;
    grid-template-columns: 300px 300px 420px;
    gap: 50px;
    justify-content: center;
}

/* Second row grid */
.gallery-row-2 {
    display: grid;
    grid-template-columns: 421px 658px;
    gap: 50px;
    justify-content: center;
}

.gallery .card {
    height: 320px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
}

.gallery .card a {
    display: block;
    height: 100%;
    text-decoration: none;
}

.card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    color: white;
    font-size: 24px;
    font-weight: 600;
    transition: transform 0.3s ease-in-out;
}

.gallery .card:hover .card-title {
    transform: translateY(-5px);
}

.gallery .card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); 
}

.gallery .card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-in-out; 
}

.gallery .card:hover img {
    transform: scale(1.05); 
}

@media (max-width: 768px) {
    .gallery {
        display: flex;
        overflow-x: auto;
        gap: 15px;
        padding: 20px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .gallery::-webkit-scrollbar {
        display: none;
    }

    .gallery .card {
        min-width: 348px;
        width: 348px;
        flex-shrink: 0;   
    }

    .gallery .card img {
        margin-right: 0; /* Remove excess margin */
    }

    .gallery-row-1,
    .gallery-row-2 {
        display: flex;
        gap: 15px; /* Consistent gap */
    }
}